package com.crs.vo;

import com.crs.entity.Resource_category;
import com.crs.entity.Resource_image;
import com.crs.entity.User;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ResourceListVo {

    private Integer id;
    private String name;
    private String description;
    private String location;
    private Integer status;
    private Integer viewCount;
    private Integer borrowCount;

    private UserInfo userInfo;

    private ResourceCategoryInfo resourceCategoryInfo;

    private List<ResourceImageInfo> resourceImageInfo;

    @Data
    public static class UserInfo{
        private Long id;
        private String username;
    }

   @Data
   public static class ResourceCategoryInfo{
        private Integer id;
        private String name;
   }

    @Data
    public static class ResourceImageInfo{
        private Integer id;
        private String imageUrl;
    }

}
